package com.yohann.aliyun_service.utils;

import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Random;

/**
 * <p>
 * 获取验证码随机数
 * </p>
 *
 * @author Yohann
 * @since 2020/11/1
 */
public class RandomUtil {

    private static final Random random = new Random();

    private static final DecimalFormat fourdf = new DecimalFormat("0000");

    public static String getRandomCode() {
        return fourdf.format(random.nextInt(10000));
    }
}